package cn.code.springboot3pagehelper.service.impl;

import cn.code.springboot3pagehelper.mapper.WxUserinfoMapper;
import cn.code.springboot3pagehelper.pojo.entity.WxUserinfo;
import cn.code.springboot3pagehelper.service.IUserService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements IUserService {


    @Autowired
    private WxUserinfoMapper wxUserinfoMapper;
    @Override
    public PageInfo<WxUserinfo> getUserList(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<WxUserinfo> users = wxUserinfoMapper.list();
        return new PageInfo<>(users);
    }
}
